<? session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<? require("../connectDB.php");

$sql = mysql_query("select  *  from user_account where user_id = '".$_SESSION["ses_id"]."'");

while($result = mysql_fetch_array($sql))    { ?>
<form action="updateUser.php" method="post" name="edit">
<br>
  <p class="style30">ระบบจัดการข้อมูลเบื้องต้น</p>
  <hr />
  <br>
<table cellpadding="5">

<TR>
<TD>ชื่อ</TD>
<TD>
<? echo $result["name"]; ?>
</TD>
</TR>
<TR>
<TD >นามสกุล</TD>
<TD> 
<? echo $result["lastname"]; ?>
</TD>
</TR>
<TR>
<TD >ชื่อผู้ใช้(User name)</TD>
<TD> 
<input type="text" name="uid" value='<? echo $result["user_name"]; ?>'>
</TD>
</TR>
<TR>
<TD>รหัสผ่าน(Password)</TD>
<TD> <input type="text" name="upwd" value='<? echo $result["password"]; ?>'>
</TD>
</TR>
<TR>
</TR>
<TR>
<TD >รหัสนักศึกษา</TD>
<TD> 
<? echo $result["student_id"]; ?>
</TD>
</TR>
<TR>
<TD >สาขา</TD>
<TD> 
<? echo $result["major"]; ?>
</TD>
</TR>
<TR>
<TD>อีเมล์(E-mail)</TD>
<TD> 
<input type="text" name="mail" value='<? echo $result["email"]; ?>'>
</TD>
</TR>
<TR>
<td>
<input type="hidden" value='<? echo $result["user_id"]; ?>' name="id" />
</td>
<td> <input type="submit" name="btnOk" value="บันทึก" style="cursor=hand">&nbsp;<input type="button" name="btn" id="btn" value="ยกเลิก" onclick="window.location='manageStudent.php'"></td>
</TR>
</table>

</form>
<? }

mysql_free_result($sql);
mysql_close($con); ?>
</BODY>
</HTML>
